1. Field of the Invention
The present invention relates to protocols for communicating across computer networks. More specifically, the present invention relates to a method and an apparatus for bypassing use of a protocol checksum during communications across a reliable network link.
2. Related Art
Protocols for communicating across a computer network typically rely on checksums to ensure that a message is communicated without errors. When a message is being sent, the sender computes a checksum by calculating a function over the message body. This checksum is then inserted into a packet containing the message before the message is sent across a computer network to a receiver. Upon receiving the message, the receiver re-computes the checksum using the same function employed by the sender and compares the re-computed checksum with the previously computed checksum contained in the packet. If the checksums match, the receiver has a high degree of confidence that the message did not change during the communication process. If the checksums do not match, the receiver knows that either the message body or the checksum contained in the packet has somehow become corrupted during the communication process.
Unfortunately, computing a checksum is a very computationally expensive process because the checksum function is applied to all of the data within the message body. This can be particularly burdensome for server computer systems that continually send and receive communications from numerous client computer systems. In these types of server computer systems, the computational workload from computing checksums can seriously degrade system performance.
In order to remedy this problem, it is possible to use special-purpose hardware to compute checksums. In this way, the computer system's processor can be freed from having to perform checksum computations. Note that this special-purpose hardware can be integrated into a network interface card (NIC) through which a computer system communicates across the computer network.
In order to facilitate using this special-purpose hardware, protocols have been modified so that a protocol stack will not compute a checksum if an associated NIC provides special-purpose hardware to perform the checksum computation.
For example, a NIC driver can inform the Internet Protocol (IP) stack that associated NIC has hardware checksum capability. During a subsequent transmission of an outgoing packet, the protocol stack does not compute the checksum, but instead allows the NIC hardware to calculate the checksum, and deposit it directly into the checksum field of the packet header before sending the packet to the receiver. During a subsequent reception of an incoming packet, the NIC computes a checksum for the incoming packet, and the computed checksum is communicated to the protocol stack. The protocol stack then compares the value calculated by the NIC with the value found in the packet header, and accepts the packet if the comparison succeeds.
Unfortunately, providing special-purpose hardware in computer systems for computing checksums introduces addition cost. Moreover, some recently developed communication standards, such as the InfiniBand standard, provide reliable link layer communications between computer systems. Hence, additional protocol-level checksums are largely wasted for these reliable network links, which already provide data integrity checks. Unfortunately, checksums in existing protocols, such as TCP/IP, are a requirement, not an option. And this is unlikely to change in the near future.
Hence, what is needed is a method and an apparatus for bypassing use of a protocol checksum during communications across a reliable network link.